 public function addcourse($coursename,$deptid)                             Class Layer
 {   
     $Query ="INSERT INTO project.course(course_name,Dept_ID) 
   VALUES('$coursename','$deptid')";
  if (!mysql_query($Query))
  {
      die('Error: ' . mysql_error());
  }
 }
________________________________________________________________
$newcourse= new department();
$newcourse->coursename=$_POST['coursename'];                             Logic LAyer
$newcourse->deptid=$_POST['dept_ID'];
$newcourse->addcourse ($newcourse->coursename,$newcourse->deptid);